using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace BardsTaleViewer {
  public class PicturePlayer {
    private IPicture _picture;
    private List<AnimPlayer> _animsPlayer;
    public Bitmap _bitmap;

    public PicturePlayer (IPicture picture) {
      _picture = picture;
      _bitmap = _picture.Bitmap.Copy ();
      _animsPlayer = new List<AnimPlayer> ();
      if (_picture.Anims != null)
        foreach (IAnim anim in _picture.Anims) {
          _animsPlayer.Add (new AnimPlayer (anim, _bitmap));
        }
    }

    public void Tick () {
      foreach (AnimPlayer animPlayer in _animsPlayer) {
        animPlayer.Tick ();
      }
    }
  }
}
